
/*
vue-router：Vue 官方的路由库，用于在不同页面（组件）之间切换。
createRouter：创建一个新的路由实例。
createWebHistory：使用 HTML5 的 history 模式（即地址栏是 /revenue-detail 这样的路径，而不是 #/revenue-detail）。
*/
import { createRouter, createWebHistory } from 'vue-router'


import SelfLiveSummary from '../views/SelfLiveSummary.vue'
import RevenueDetail from '../views/RevenueDetail.vue'
import Dashboard from '../views/Dashboard.vue'
import DouyinProjectAnalysis from '../views/DouyinProjectAnalysis.vue'
import TrendLineChart from '../components/DouyinProjectAnalysis/TrendLineChart.vue'
import StoreDashboard from '../components/DouyinProjectAnalysis/StoreDashboard.vue'
import CarrierDistributionBoard from '../components/DouyinProjectAnalysis/CarrierDistributionBoard.vue'
import CarrierPieChart from '../components/DouyinProjectAnalysis/CarrierPieChart.vue'
import DouyinProjectAnalysisTable from '../components/DouyinProjectAnalysis/TableTemplate.vue'
import DouyinProjectAnalysisTableSpk from '../components/DouyinProjectAnalysis/TableTemplateSpk.vue'
import DouyinProjectAnalysisTableZhiBo from '../components/DouyinProjectAnalysis/TableTemplateZhiBo.vue'

import TableAndTandLine from '../components/DouyinProjectAnalysis/TableAndTandLine.vue'

/*
定义路由规则

这是一个 路由映射表，定义了 URL 与组件的对应关系：
path（路径）	name（命名路由）	component（组件）	说明
'/'	'Dashboard'	Dashboard	首页，显示总体看板数据
'/revenue-detail'	'RevenueDetail'	RevenueDetail	明细页，显示具体收入列表

这样，当你访问：

http://localhost:5173/ → 展示 SelfLiveSummary.vue

http://localhost:5173/revenue-detail → 展示 RevenueDetail.vue
*/
const routes = [
    //自营主播数据汇总
    { path: '/', name: 'SelfLiveSummary', component: SelfLiveSummary },

    //抖音项目分析
    { path: '/DouyinProjectAnalysis', name: 'DouyinProjectAnalysis', component: DouyinProjectAnalysis },
    { path: '/TrendLineChart', name: 'TrendLineChart', component: TrendLineChart },
    { path: '/StoreDashboard', name: 'StoreDashboard', component: StoreDashboard },
    { path: '/CarrierDistributionBoard', name: 'CarrierDistributionBoard', component: CarrierDistributionBoard },
    { path: '/CarrierPieChart', name: 'CarrierPieChart', component: CarrierPieChart },
    { path: '/DouyinProjectAnalysisTable', name: 'DouyinProjectAnalysisTable', component: DouyinProjectAnalysisTable },
    { path: '/DouyinProjectAnalysisTableSpk', name: 'DouyinProjectAnalysisTableSpk', component: DouyinProjectAnalysisTableSpk },
    { path: '/DouyinProjectAnalysisTableZhiBo', name: 'DouyinProjectAnalysisTableZhiBo', component: DouyinProjectAnalysisTableZhiBo },
    { path: '/TableAndTandLine', name: 'TableAndTandLine', component: TableAndTandLine },

    //看板数据
    { path: '/dashboard', name: 'Dashboard', component: Dashboard },
    { path: '/revenue-detail', name: 'RevenueDetail', component: RevenueDetail }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
